<!-- Content Header (Page header) -->
<section class="content-header">
  <h1>
    模态框
    <small>DEMO</small>
  </h1>
  <ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
    <li class="active">模态框</li>
  </ol>
</section>

<!-- Main content -->
<section class="content">
  <button id="myButton">打开模态框</button>
</section>

<script>
  (function(){
    $("#myButton").on("click",function(){
      //调用模态框接口
      USEN.modal({
        title:"模态框标题",
        url:"./simdata/zb_kehuxinxi_add_action.json",
        dataType:"JSON",
        filter:function(data){
          return '<h2>从服务器中抓取的数据为:</h2><input><select class="js-example-basic-single"><option>123</option></select>' + data
        },
        success:function(){

          $(this).find("select").width("98%").select2({
            dropdownParent:$(this)
          })
        },
        content:null,
        submitBtn:true,
        submitTxt:"确定",
        submitCb:function(e,$el){
          alert('submit callback');
        },
        cancelBtn:true,
        cancelTxt:"取消",
        cancelCb: function (e,$el) {
          alert('cancel callback');
        }
      })
    })
  })()

</script>
